package com.xyb.vo;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.List;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class SysRoleVo {

    public interface update{}
    /**
     * 角色id
     */
    @NotNull(message="角色id不能为空",groups = {SysMenuVo.update.class})
    private Long roleId;
    /**
     * 角色名称
     */
    @NotBlank(message = "角色名称不能为空",groups = {SysMenuVo.update.class})
    @Length(max = 20, message = "角色名称长度不得超过20个字符",groups = {SysMenuVo.update.class})
    private String roleName;
    /**
     * 角色描述
     */
    @Length(max = 100, message = "角色描述长度不得超过20个字符",groups = {SysMenuVo.update.class})
    private String roleDesc;
    /**
     * 排序
     */
    private Long showOrder;
    private Integer status;

    /**
     * 当前角色的菜单列表
     */
    private List<Long> menuIds;
}
